package com.plian.system.entity.hr.staff;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @description: 董事会
 * @author: gangan
 * @create: 2020-03-15 19:09
 */
@Data
@TableName("hr_director")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "董事会", description = "董事会")
public class Director extends BaseEntity {

    /**
     * 主表主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主表主键")
    private Long staffFilesId;

    /**
     * 单位
     */
    @ApiModelProperty(value = "单位")
    private String companyId;

    /**
     * 人员姓名
     */
    @ApiModelProperty(value = "人员姓名", required = true)
    private String staffName;

    /**
     * 是否外部董事（1否2是）
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "是否外部董事（1否2是）", required = true)
    private Integer isOutDirector;

    /**
     * 董事职务Id
     */
    @ApiModelProperty(value = "单位名董事职务Id称", required = true)
    private String directorshipId;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别", required = true)
    private String genderId;

    /**
     * 出生日期
     */
    @TableField(value = "BIRTHDAY",updateStrategy = FieldStrategy.IGNORED)
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @ApiModelProperty(value = "出生日期", required = true)
    private Date birthday;

    /**
     * 任职时间
     */
    @ApiModelProperty(value = "任职时间", required = true)
    private String appointmentTime;

    @ApiModelProperty(value = "单据类型")
    private String formType;

    /**
     * 政治面貌
     */
    @ApiModelProperty(value = "政治面貌", required = true)
    private String politicCountenanceId;

    /**
     * 最高学历
     */
    @ApiModelProperty(value = "最高学历", required = true)
    private String educationalId;

    /**
     * 证件号
     */
    @ApiModelProperty(value = "证件号", required = true)
    private String documentNumber;

    /**
     * 籍贯
     */
    @ApiModelProperty(value = "籍贯")
    private String nativePlace;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    private String telephone;

    /**
     * 家庭住址
     */
    @ApiModelProperty(value = "家庭住址")
    private String familyAddress;

    /**
     * 简历
     */
    @ApiModelProperty(value = "简历")
    private String resume;

    /**
     * 数据来源 null为系统填报 对应用户id
     */
    @ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
    private String dataSource;

    /**
     * 数据来源id
     */
    @ApiModelProperty(value = "数据来源id", required = true)
    private String dataSourceId;

}
